import request from "../utils/request";
import { stringify } from 'qs';
export async function queryData() {
  return request("/api/stockholds", {
    method : "get"
  })
}

export async function querySignals() {
  return request("/api/signals", {
    method : 'get'
  })
}

export async function queryInfo(){
  return request("/api/money", {
    method : "get"
  })
}

export async function settingMoney(params){
  return request("/api/money",{
    method : "put",
    data : stringify(params)
  })
}

export async function buyOrSale(params) {
  return request("/api/signals", {
    method : "put",
    data : stringify(params)
  })
}

export async function queryName() {
  return request("/api/strategy", {
    method : "get"
  })
}

export async function ignore(params) {
  return request("/api/signals",{
    method : "delete",
    data : stringify(params)
  })
}

export async function loginSystem(params) {
  return request("/api/login", {
    method : "put",
    data : stringify(params)
  })
}

export async function queryHistory(params) {
  return request("/api/history", {
    method : 'POST',
    data : stringify(params)
  })
}